﻿@using Treca.WebEx.Entity;
@using Treca.Util;
@using EFCore.Sharding;
@using Treca.Business.Base_SysManage;
@inherits DependencyViewPage
@using System.Data;
@using Microsoft.AspNetCore.Http;
@using Treca.Base_SysManage.Entity;
@using EFCore.Sharding.ExField;
@{
    Layout = "~/Views/Shared/_Layout_NewForm.cshtml";

    var obj = (base_searchplan)Model;
    var objStr = Html.Raw(obj.ToJson());
    Boolean isview = (Boolean)this.ViewData["isview"];
    BaseDataHelper dataHelper = (BaseDataHelper)this.ViewData["listHelper"];

}
<script>
    var isview =@isview.ToString().ToLower();
    var theEntity = @objStr;
    var mcelist = [];
</script>
<div class="fx-wrapper">
    <form class="form-inline" id="searchForm" style="width: 800px">
        <div class="form-group">
            <!--    <div class="col-sm-2 input-icon-group"  style="width: 60 % ">
                  添加文件
                 <div id="WorkerContractImg" style="width:120px;height:104px;overflow:inherit" ></div>
              </div>
              <button type = "button" class="btn btn-info btn-sm" onclick="speech()" );" >
                  <i class="glyphicon glyphicon-export" ></i>
                  语音输入
              </button>
              <input type = "file1" id="file1" name ="myfile1" style="display: none" />

              <button type = "button" class="btn btn-success btn-sm" onclick="OCRForm()" );" >
                  <i class="glyphicon glyphicon-export" ></i>
                  表单识别
              </button> -->
            <!-- <button id = "submit" type="button" > 提交</button>-->

        </div>
    </form>
</div>
<div style="padding:15px;padding-right:45px;">
    <form id="form" class="form-horizontal" role="form">

        <div class="form-group form-group-sm">
            <label class="col-sm-2 control-label">@TranslateService.GetTranslate("", "Base_SysManage_base_searchplan_searchplanname", "搜索计划名称")</label>
            <div class="col-sm-5">
                @{
                    base_selectresource_data dataselectsearchplanname = dataHelper.GetDataUrlAll("Base_SysManage", "base_searchplan", "searchplanname");
                    if (!dataselectsearchplanname.sr.IsNullOrEmpty() && !dataselectsearchplanname.sr.Id.IsNullOrEmpty())
                    {
                        if (dataselectsearchplanname.bs.selecttype == "1")
                        {
                            <select id="searchplanname" name="searchplanname" value="@obj.searchplanname" class="form-control column selectpicker" data-live-search="true">
                                @foreach (DataRow rows in dataselectsearchplanname.data.Rows)
                                {
                                    if (("," + @obj.searchplanname + ",").Contains("," + rows[0].ToString() + ","))
                                    {
                                        <option value="@rows[0]" selected>@rows[1]</option>
                                    }
                                    else
                                    {
                                        <option value="@rows[0]">@rows[1]</option>
                                    }
                                }
                            </select>

                        }
                        else if (dataselectsearchplanname.bs.selecttype == "3")
                        {
                            <select id="searchplanname" name="searchplanname" value="@obj.searchplanname" class="form-control column selectpicker" data-live-search="true" multiple>
                                @foreach (DataRow rows in dataselectsearchplanname.data.Rows)
                                {
                                    if (("," + @obj.searchplanname + ",").Contains("," + rows[0].ToString() + ","))
                                    {
                                        <option value="@rows[0]" selected>@rows[1]</option>
                                    }
                                    else
                                    {
                                        <option value="@rows[0]">@rows[1]</option>
                                    }
                                }
                            </select>
                        }
                        else if (dataselectsearchplanname.bs.selecttype == "2")
                        {
                            List<string> strs = new List<string>();
                            var searchplannameval = "";
                            @foreach (DataRow rows in dataselectsearchplanname.data.Rows)
                            {
                                if (("," + @obj.searchplanname + ",").Contains("," + rows[0].ToString() + ","))
                                {
                                    strs.Add(rows[1].ToString());
                                    searchplannameval = string.Join(",", strs);
                                }
                            }
                            string typename = @dataselectsearchplanname.sr.tablename.Split('.')[@dataselectsearchplanname.sr.tablename.Split('.').Length - 1];
                            string areaname = @dataselectsearchplanname.sr.tablename.Split('.')[@dataselectsearchplanname.sr.tablename.Split('.').Length - 3];
                            <input readonly='readonly' id='searchplanname__Name' name='searchplanname__Name' value='@searchplannameval' onclick='openFormSelect("/@areaname/@typename","@dataselectsearchplanname.sr.filedcode,@dataselectsearchplanname.sr.filedvalue",this); ' type='text' class='form-control column' readonly='readonly'>
                            <input readonly='readonly' id='searchplanname' name='searchplanname' value='@obj.searchplanname' type='text' style='display:none' class='form-control column' readonly='readonly'>
                        }
                        else if (dataselectsearchplanname.bs.selecttype == "4")
                        {
                            <div id='searchplanname__Img' style='width:100%; height:200px; overflow: auto'></div>
                            <input id='searchplanname__Name' name='searchplanname__Name' value='@obj.searchplanname' type='text' style='display:none' class='form-control column' readonly='readonly' />
                            <input id='searchplanname' name='searchplanname' value='@obj.searchplanname' type='text' style='display:none' class='form-control column' readonly='readonly' />
                            @Html.Raw("<script>\n");
                            @Html.Raw("$(function(){\n");
                            @Html.Raw("$('#searchplanname__Img').html5Uploader({\n");
                            @Html.Raw("asyncUpload: true,\n");
                            @Html.Raw("uploadUrl: '/Base_SysManage/Common/UploadFile',\n");
                            @Html.Raw("uploadLimit: 0,  //上传数量限制，0为不限\n");
                            @Html.Raw("sizeLimit: 5,    //大小限制，M\n");
                            @Html.Raw("type: 'file' //file即可上传文件也可上传图片\n");
                            @Html.Raw("});\n");
                            @Html.Raw("$('#searchplanname__Name').trigger('propertychange');});\n");
                            @Html.Raw("$('#searchplanname__Name').on(' input propertychange',function(){\n");
                            @Html.Raw("var urls = $(this).val().split(',');\n");
                            @Html.Raw("var ids = $('#searchplanname').val().split(',');\n");
                            @Html.Raw("$.each(urls, function(index, url){\n");
                            @Html.Raw("if(url!='')\n");
                            @Html.Raw("$('#searchplanname__Img').html5Uploader('insertItemNew',{src:url,id:ids[index]});\n");
                            @Html.Raw("});\n");
                            @Html.Raw("});\n");
                            @Html.Raw("</script>\n");
                        }
                        else if (dataselectsearchplanname.bs.selecttype == "6")
                        {
                            <input id='searchplanname' name='searchplanname' value='@obj.searchplanname' type='text' style='display:none' class='form-control column' readonly='readonly' />
                            <select id='searchplanname__Name' class='form-control column' data-live-search='true'>
                                @foreach (DataRow rows in dataselectsearchplanname.data.Rows)
                                {
                                    if ((',' + @obj.searchplanname + ',').Contains(',' + rows[0].ToString() + ','))
                                    {
                                        <option value='@rows[0]' selected>@rows[1]</option>
                                    }
                                    else
                                    {
                                        <option value='@rows[0]'>@rows[1]</option>
                                    }
                                }
                            </select>
                            <script>
                                //初始化控件
                                $('#searchplanname__Name').on('select.editable-select', function (e, li) {
                                    // do something...
                                    $('#searchplanname').val(li.attr('value'));
                                }).editableSelect();
                                $('#searchplanname__Name').keyup(function () {
                                    $('#searchplanname').val($('#searchplanname__Name').val());
                                });
                            </script>

                        }
                        else if (dataselectsearchplanname.bs.selecttype == "7")
                        {
                            <div id="searchplanname" name="searchplanname"></div>
                            <script>
                                //富文本编辑器
                                if (isview) {
                                    tinymce.init({
                                        selector: '#searchplanname',
                                        language: 'zh_CN',
                                        contextmenu: false,
                                        plugins: 'print preview searchreplace autolink directionality visualchars fullscreen image link media template code table charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists wordcount imagetools textpattern paste emoticons bdmap indent2em autoresize',
                                        toolbar: 'code forecolor backcolor bold italic underline strikethrough | alignleft aligncenter alignright indent2em lineheight | \
                                                                                                    bullist numlist | blockquote subscript superscript removeformat | \
                                                                                                    table emoticons charmap hr  insertdatetime | fullscreen ',
                                        menubar: false,
                                        fontsize_formats: '12px 14px 16px 18px 24px 36px 48px 56px 72px',
                                        autosave_ask_before_unload: false,
                                        toolbar_drawer: false,
                                        readonly: 1,
                                    });
                                    $('#searchplanname').html(theEntity.searchplanname);
                                    mcelist.push('searchplanname');
                                }
                                else {
                                    tinymce.init({
                                        selector: '#searchplanname',
                                        language: 'zh_CN',
                                        contextmenu: false,
                                        plugins: 'print preview searchreplace autolink directionality visualchars fullscreen image link media template code table charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists wordcount imagetools textpattern paste emoticons bdmap indent2em autoresize',
                                        toolbar: 'code forecolor backcolor bold italic underline strikethrough | alignleft aligncenter alignright indent2em lineheight | \
                                                                                                    bullist numlist | blockquote subscript superscript removeformat | \
                                                                                                    table emoticons charmap hr  insertdatetime | fullscreen ',
                                        menubar: false,
                                        fontsize_formats: '12px 14px 16px 18px 24px 36px 48px 56px 72px',
                                        autosave_ask_before_unload: false,
                                        toolbar_drawer: false,

                                    });
                                    $('#searchplanname').html(theEntity.searchplanname);
                                    mcelist.push('searchplanname');
                                }
                            </script>

                        }
                    }
                    else
                    {
                        <input id="searchplanname" name="searchplanname" maxlength="100" value="@obj.searchplanname" type="text" class="form-control column">}}
        </div>
    </div>
    <div class="form-group form-group-sm">
        <label class="col-sm-2 control-label">@TranslateService.GetTranslate("", "Base_SysManage_base_searchplan_userid", "用户名")</label>
        <div class="col-sm-5">
            @{
                base_selectresource_data dataselectuserid = dataHelper.GetDataUrlAll("Base_SysManage", "base_searchplan", "userid");
                if (!dataselectuserid.sr.IsNullOrEmpty() && !dataselectuserid.sr.Id.IsNullOrEmpty())
                {
                    if (dataselectuserid.bs.selecttype == "1")
                    {
                        <select id="userid" name="userid" value="@obj.userid" class="form-control column selectpicker" data-live-search="true">
                            @foreach (DataRow rows in dataselectuserid.data.Rows)
                            {
                                if (("," + @obj.userid + ",").Contains("," + rows[0].ToString() + ","))
                                {
                                    <option value="@rows[0]" selected>@rows[1]</option>
                                }
                                else
                                {
                                    <option value="@rows[0]">@rows[1]</option>
                                }
                            }
                        </select>

                    }
                    else if (dataselectuserid.bs.selecttype == "3")
                    {
                        <select id="userid" name="userid" value="@obj.userid" class="form-control column selectpicker" data-live-search="true" multiple>
                            @foreach (DataRow rows in dataselectuserid.data.Rows)
                            {
                                if (("," + @obj.userid + ",").Contains("," + rows[0].ToString() + ","))
                                {
                                    <option value="@rows[0]" selected>@rows[1]</option>
                                }
                                else
                                {
                                    <option value="@rows[0]">@rows[1]</option>
                                }
                            }
                        </select>
                    }
                    else if (dataselectuserid.bs.selecttype == "2")
                    {
                        List<string> strs = new List<string>();
                        var useridval = "";
                        @foreach (DataRow rows in dataselectuserid.data.Rows)
                        {
                            if (("," + @obj.userid + ",").Contains("," + rows[0].ToString() + ","))
                            {
                                strs.Add(rows[1].ToString());
                                useridval = string.Join(",", strs);
                            }
                        }
                        string typename = @dataselectuserid.sr.tablename.Split('.')[@dataselectuserid.sr.tablename.Split('.').Length - 1];
                        string areaname = @dataselectuserid.sr.tablename.Split('.')[@dataselectuserid.sr.tablename.Split('.').Length - 3];
                        <input readonly='readonly' id='userid__Name' name='userid__Name' value='@useridval' onclick='openFormSelect("/@areaname/@typename","@dataselectuserid.sr.filedcode,@dataselectuserid.sr.filedvalue",this); ' type='text' class='form-control column' readonly='readonly'>
                        <input readonly='readonly' id='userid' name='userid' value='@obj.userid' type='text' style='display:none' class='form-control column' readonly='readonly'>
                    }
                    else if (dataselectuserid.bs.selecttype == "4")
                    {
                        <div id='userid__Img' style='width:100%; height:200px; overflow: auto'></div>
                        <input id='userid__Name' name='userid__Name' value='@obj.userid' type='text' style='display:none' class='form-control column' readonly='readonly' />
                        <input id='userid' name='userid' value='@obj.userid' type='text' style='display:none' class='form-control column' readonly='readonly' />
                        @Html.Raw("<script>\n");
                        @Html.Raw("$(function(){\n");
                        @Html.Raw("$('#userid__Img').html5Uploader({\n");
                        @Html.Raw("asyncUpload: true,\n");
                        @Html.Raw("uploadUrl: '/Base_SysManage/Common/UploadFile',\n");
                        @Html.Raw("uploadLimit: 0,  //上传数量限制，0为不限\n");
                        @Html.Raw("sizeLimit: 5,    //大小限制，M\n");
                        @Html.Raw("type: 'file' //file即可上传文件也可上传图片\n");
                        @Html.Raw("});\n");
                        @Html.Raw("$('#userid__Name').trigger('propertychange');});\n");
                        @Html.Raw("$('#userid__Name').on(' input propertychange',function(){\n");
                        @Html.Raw("var urls = $(this).val().split(',');\n");
                        @Html.Raw("var ids = $('#userid').val().split(',');\n");
                        @Html.Raw("$.each(urls, function(index, url){\n");
                        @Html.Raw("if(url!='')\n");
                        @Html.Raw("$('#userid__Img').html5Uploader('insertItemNew',{src:url,id:ids[index]});\n");
                        @Html.Raw("});\n");
                        @Html.Raw("});\n");
                        @Html.Raw("</script>\n");
                    }
                    else if (dataselectuserid.bs.selecttype == "6")
                    {
                        <input id='userid' name='userid' value='@obj.userid' type='text' style='display:none' class='form-control column' readonly='readonly' />
                        <select id='userid__Name' class='form-control column' data-live-search='true'>
                            @foreach (DataRow rows in dataselectuserid.data.Rows)
                            {
                                if ((',' + @obj.userid + ',').Contains(',' + rows[0].ToString() + ','))
                                {
                                    <option value='@rows[0]' selected>@rows[1]</option>
                                }
                                else
                                {
                                    <option value='@rows[0]'>@rows[1]</option>
                                }
                            }
                        </select>
                        <script>
                            //初始化控件
                            $('#userid__Name').on('select.editable-select', function (e, li) {
                                // do something...
                                $('#userid').val(li.attr('value'));
                            }).editableSelect();
                            $('#userid__Name').keyup(function () {
                                $('#userid').val($('#userid__Name').val());
                            });
                        </script>

                    }
                    else if (dataselectuserid.bs.selecttype == "7")
                    {
                        <div id="userid" name="userid"></div>
                        <script>
                            //富文本编辑器
                            if (isview) {
                                tinymce.init({
                                    selector: '#userid',
                                    language: 'zh_CN',
                                    contextmenu: false,
                                    plugins: 'print preview searchreplace autolink directionality visualchars fullscreen image link media template code table charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists wordcount imagetools textpattern paste emoticons bdmap indent2em autoresize',
                                    toolbar: 'code forecolor backcolor bold italic underline strikethrough | alignleft aligncenter alignright indent2em lineheight | \
                                                                                                bullist numlist | blockquote subscript superscript removeformat | \
                                                                                                table emoticons charmap hr  insertdatetime | fullscreen ',
                                    menubar: false,
                                    fontsize_formats: '12px 14px 16px 18px 24px 36px 48px 56px 72px',
                                    autosave_ask_before_unload: false,
                                    toolbar_drawer: false,
                                    readonly: 1,
                                });
                                $('#userid').html(theEntity.userid);
                                mcelist.push('userid');
                            }
                            else {
                                tinymce.init({
                                    selector: '#userid',
                                    language: 'zh_CN',
                                    contextmenu: false,
                                    plugins: 'print preview searchreplace autolink directionality visualchars fullscreen image link media template code table charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists wordcount imagetools textpattern paste emoticons bdmap indent2em autoresize',
                                    toolbar: 'code forecolor backcolor bold italic underline strikethrough | alignleft aligncenter alignright indent2em lineheight | \
                                                                                                bullist numlist | blockquote subscript superscript removeformat | \
                                                                                                table emoticons charmap hr  insertdatetime | fullscreen ',
                                    menubar: false,
                                    fontsize_formats: '12px 14px 16px 18px 24px 36px 48px 56px 72px',
                                    autosave_ask_before_unload: false,
                                    toolbar_drawer: false,

                                });
                                $('#userid').html(theEntity.userid);
                                mcelist.push('userid');
                            }
                        </script>

                    }
                }
                else
                {
                    <input id="userid" name="userid" maxlength="50" value="@obj.userid" type="text" class="form-control column">}}
    </div>
</div>
<div class="form-group form-group-sm">
    <label class="col-sm-2 control-label">@TranslateService.GetTranslate("", "Base_SysManage_base_searchplan_roleid", "车牌号")</label>
    <div class="col-sm-5">
        @{
            base_selectresource_data dataselectroleid = dataHelper.GetDataUrlAll("Base_SysManage", "base_searchplan", "roleid");
            if (!dataselectroleid.sr.IsNullOrEmpty() && !dataselectroleid.sr.Id.IsNullOrEmpty())
            {
                if (dataselectroleid.bs.selecttype == "1")
                {
                    <select id="roleid" name="roleid" value="@obj.roleid" class="form-control column selectpicker" data-live-search="true">
                        @foreach (DataRow rows in dataselectroleid.data.Rows)
                        {
                            if (("," + @obj.roleid + ",").Contains("," + rows[0].ToString() + ","))
                            {
                                <option value="@rows[0]" selected>@rows[1]</option>
                            }
                            else
                            {
                                <option value="@rows[0]">@rows[1]</option>
                            }
                        }
                    </select>

                }
                else if (dataselectroleid.bs.selecttype == "3")
                {
                    <select id="roleid" name="roleid" value="@obj.roleid" class="form-control column selectpicker" data-live-search="true" multiple>
                        @foreach (DataRow rows in dataselectroleid.data.Rows)
                        {
                            if (("," + @obj.roleid + ",").Contains("," + rows[0].ToString() + ","))
                            {
                                <option value="@rows[0]" selected>@rows[1]</option>
                            }
                            else
                            {
                                <option value="@rows[0]">@rows[1]</option>
                            }
                        }
                    </select>
                }
                else if (dataselectroleid.bs.selecttype == "2")
                {
                    List<string> strs = new List<string>();
                    var roleidval = "";
                    @foreach (DataRow rows in dataselectroleid.data.Rows)
                    {
                        if (("," + @obj.roleid + ",").Contains("," + rows[0].ToString() + ","))
                        {
                            strs.Add(rows[1].ToString());
                            roleidval = string.Join(",", strs);
                        }
                    }
                    string typename = @dataselectroleid.sr.tablename.Split('.')[@dataselectroleid.sr.tablename.Split('.').Length - 1];
                    string areaname = @dataselectroleid.sr.tablename.Split('.')[@dataselectroleid.sr.tablename.Split('.').Length - 3];
                    <input readonly='readonly' id='roleid__Name' name='roleid__Name' value='@roleidval' onclick='openFormSelect("/@areaname/@typename","@dataselectroleid.sr.filedcode,@dataselectroleid.sr.filedvalue",this); ' type='text' class='form-control column' readonly='readonly'>
                    <input readonly='readonly' id='roleid' name='roleid' value='@obj.roleid' type='text' style='display:none' class='form-control column' readonly='readonly'>
                }
                else if (dataselectroleid.bs.selecttype == "4")
                {
                    <div id='roleid__Img' style='width:100%; height:200px; overflow: auto'></div>
                    <input id='roleid__Name' name='roleid__Name' value='@obj.roleid' type='text' style='display:none' class='form-control column' readonly='readonly' />
                    <input id='roleid' name='roleid' value='@obj.roleid' type='text' style='display:none' class='form-control column' readonly='readonly' />
                    @Html.Raw("<script>\n");
                    @Html.Raw("$(function(){\n");
                    @Html.Raw("$('#roleid__Img').html5Uploader({\n");
                    @Html.Raw("asyncUpload: true,\n");
                    @Html.Raw("uploadUrl: '/Base_SysManage/Common/UploadFile',\n");
                    @Html.Raw("uploadLimit: 0,  //上传数量限制，0为不限\n");
                    @Html.Raw("sizeLimit: 5,    //大小限制，M\n");
                    @Html.Raw("type: 'file' //file即可上传文件也可上传图片\n");
                    @Html.Raw("});\n");
                    @Html.Raw("$('#roleid__Name').trigger('propertychange');});\n");
                    @Html.Raw("$('#roleid__Name').on(' input propertychange',function(){\n");
                    @Html.Raw("var urls = $(this).val().split(',');\n");
                    @Html.Raw("var ids = $('#roleid').val().split(',');\n");
                    @Html.Raw("$.each(urls, function(index, url){\n");
                    @Html.Raw("if(url!='')\n");
                    @Html.Raw("$('#roleid__Img').html5Uploader('insertItemNew',{src:url,id:ids[index]});\n");
                    @Html.Raw("});\n");
                    @Html.Raw("});\n");
                    @Html.Raw("</script>\n");
                }
                else if (dataselectroleid.bs.selecttype == "6")
                {
                    <input id='roleid' name='roleid' value='@obj.roleid' type='text' style='display:none' class='form-control column' readonly='readonly' />
                    <select id='roleid__Name' class='form-control column' data-live-search='true'>
                        @foreach (DataRow rows in dataselectroleid.data.Rows)
                        {
                            if ((',' + @obj.roleid + ',').Contains(',' + rows[0].ToString() + ','))
                            {
                                <option value='@rows[0]' selected>@rows[1]</option>
                            }
                            else
                            {
                                <option value='@rows[0]'>@rows[1]</option>
                            }
                        }
                    </select>
                    <script>
                        //初始化控件
                        $('#roleid__Name').on('select.editable-select', function (e, li) {
                            // do something...
                            $('#roleid').val(li.attr('value'));
                        }).editableSelect();
                        $('#roleid__Name').keyup(function () {
                            $('#roleid').val($('#roleid__Name').val());
                        });
                    </script>

                }
                else if (dataselectroleid.bs.selecttype == "7")
                {
                    <div id="roleid" name="roleid"></div>
                    <script>
                        //富文本编辑器
                        if (isview) {
                            tinymce.init({
                                selector: '#roleid',
                                language: 'zh_CN',
                                contextmenu: false,
                                plugins: 'print preview searchreplace autolink directionality visualchars fullscreen image link media template code table charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists wordcount imagetools textpattern paste emoticons bdmap indent2em autoresize',
                                toolbar: 'code forecolor backcolor bold italic underline strikethrough | alignleft aligncenter alignright indent2em lineheight | \
                                                                                            bullist numlist | blockquote subscript superscript removeformat | \
                                                                                            table emoticons charmap hr  insertdatetime | fullscreen ',
                                menubar: false,
                                fontsize_formats: '12px 14px 16px 18px 24px 36px 48px 56px 72px',
                                autosave_ask_before_unload: false,
                                toolbar_drawer: false,
                                readonly: 1,
                            });
                            $('#roleid').html(theEntity.roleid);
                            mcelist.push('roleid');
                        }
                        else {
                            tinymce.init({
                                selector: '#roleid',
                                language: 'zh_CN',
                                contextmenu: false,
                                plugins: 'print preview searchreplace autolink directionality visualchars fullscreen image link media template code table charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists wordcount imagetools textpattern paste emoticons bdmap indent2em autoresize',
                                toolbar: 'code forecolor backcolor bold italic underline strikethrough | alignleft aligncenter alignright indent2em lineheight | \
                                                                                            bullist numlist | blockquote subscript superscript removeformat | \
                                                                                            table emoticons charmap hr  insertdatetime | fullscreen ',
                                menubar: false,
                                fontsize_formats: '12px 14px 16px 18px 24px 36px 48px 56px 72px',
                                autosave_ask_before_unload: false,
                                toolbar_drawer: false,

                            });
                            $('#roleid').html(theEntity.roleid);
                            mcelist.push('roleid');
                        }
                    </script>

                }
            }
            else
            {
                <input id="roleid" name="roleid" maxlength="50" value="@obj.roleid" type="text" class="form-control column">}}
</div>
</div>
<div class="form-group form-group-sm">
    <label class="col-sm-2 control-label">@TranslateService.GetTranslate("", "Base_SysManage_base_searchplan_searchinfo", "查询条件")</label>
    <div class="col-sm-5">
        @{
            base_selectresource_data dataselectsearchinfo = dataHelper.GetDataUrlAll("Base_SysManage", "base_searchplan", "searchinfo");
            if (!dataselectsearchinfo.sr.IsNullOrEmpty() && !dataselectsearchinfo.sr.Id.IsNullOrEmpty())
            {
                if (dataselectsearchinfo.bs.selecttype == "1")
                {
                    <select id="searchinfo" name="searchinfo" value="@obj.searchinfo" class="form-control column selectpicker" data-live-search="true" required>
                        @foreach (DataRow rows in dataselectsearchinfo.data.Rows)
                        {
                            if (("," + @obj.searchinfo + ",").Contains("," + rows[0].ToString() + ","))
                            {
                                <option value="@rows[0]" selected>@rows[1]</option>
                            }
                            else
                            {
                                <option value="@rows[0]">@rows[1]</option>
                            }
                        }
                    </select>

                }
                else if (dataselectsearchinfo.bs.selecttype == "3")
                {
                    <select id="searchinfo" name="searchinfo" value="@obj.searchinfo" class="form-control column selectpicker" data-live-search="true" multiple required>
                        @foreach (DataRow rows in dataselectsearchinfo.data.Rows)
                        {
                            if (("," + @obj.searchinfo + ",").Contains("," + rows[0].ToString() + ","))
                            {
                                <option value="@rows[0]" selected>@rows[1]</option>
                            }
                            else
                            {
                                <option value="@rows[0]">@rows[1]</option>
                            }
                        }
                    </select>
                }
                else if (dataselectsearchinfo.bs.selecttype == "2")
                {
                    List<string> strs = new List<string>();
                    var searchinfoval = "";
                    @foreach (DataRow rows in dataselectsearchinfo.data.Rows)
                    {
                        if (("," + @obj.searchinfo + ",").Contains("," + rows[0].ToString() + ","))
                        {
                            strs.Add(rows[1].ToString());
                            searchinfoval = string.Join(",", strs);
                        }
                    }
                    string typename = @dataselectsearchinfo.sr.tablename.Split('.')[@dataselectsearchinfo.sr.tablename.Split('.').Length - 1];
                    string areaname = @dataselectsearchinfo.sr.tablename.Split('.')[@dataselectsearchinfo.sr.tablename.Split('.').Length - 3];
                    <input readonly='readonly' id='searchinfo__Name' name='searchinfo__Name' value='@searchinfoval' onclick='openFormSelect("/@areaname/@typename","@dataselectsearchinfo.sr.filedcode,@dataselectsearchinfo.sr.filedvalue",this); ' type='text' class='form-control column' required readonly='readonly'>
                    <input readonly='readonly' id='searchinfo' name='searchinfo' value='@obj.searchinfo' type='text' style='display:none' class='form-control column' required readonly='readonly'>
                }
                else if (dataselectsearchinfo.bs.selecttype == "4")
                {
                    <div id='searchinfo__Img' style='width:100%; height:200px; overflow: auto'></div>
                    <input id='searchinfo__Name' name='searchinfo__Name' value='@obj.searchinfo' type='text' style='display:none' class='form-control column' required readonly='readonly' />
                    <input id='searchinfo' name='searchinfo' value='@obj.searchinfo' type='text' style='display:none' class='form-control column' required readonly='readonly' />
                    @Html.Raw("<script>\n");
                    @Html.Raw("$(function(){\n");
                    @Html.Raw("$('#searchinfo__Img').html5Uploader({\n");
                    @Html.Raw("asyncUpload: true,\n");
                    @Html.Raw("uploadUrl: '/Base_SysManage/Common/UploadFile',\n");
                    @Html.Raw("uploadLimit: 0,  //上传数量限制，0为不限\n");
                    @Html.Raw("sizeLimit: 5,    //大小限制，M\n");
                    @Html.Raw("type: 'file' //file即可上传文件也可上传图片\n");
                    @Html.Raw("});\n");
                    @Html.Raw("$('#searchinfo__Name').trigger('propertychange');});\n");
                    @Html.Raw("$('#searchinfo__Name').on(' input propertychange',function(){\n");
                    @Html.Raw("var urls = $(this).val().split(',');\n");
                    @Html.Raw("var ids = $('#searchinfo').val().split(',');\n");
                    @Html.Raw("$.each(urls, function(index, url){\n");
                    @Html.Raw("if(url!='')\n");
                    @Html.Raw("$('#searchinfo__Img').html5Uploader('insertItemNew',{src:url,id:ids[index]});\n");
                    @Html.Raw("});\n");
                    @Html.Raw("});\n");
                    @Html.Raw("</script>\n");
                }
                else if (dataselectsearchinfo.bs.selecttype == "6")
                {
                    <input id='searchinfo' name='searchinfo' value='@obj.searchinfo' type='text' style='display:none' class='form-control column' readonly='readonly' />
                    <select id='searchinfo__Name' class='form-control column' data-live-search='true'>
                        @foreach (DataRow rows in dataselectsearchinfo.data.Rows)
                        {
                            if ((',' + @obj.searchinfo + ',').Contains(',' + rows[0].ToString() + ','))
                            {
                                <option value='@rows[0]' selected>@rows[1]</option>
                            }
                            else
                            {
                                <option value='@rows[0]'>@rows[1]</option>
                            }
                        }
                    </select>
                    <script>
                        //初始化控件
                        $('#searchinfo__Name').on('select.editable-select', function (e, li) {
                            // do something...
                            $('#searchinfo').val(li.attr('value'));
                        }).editableSelect();
                        $('#searchinfo__Name').keyup(function () {
                            $('#searchinfo').val($('#searchinfo__Name').val());
                        });
                    </script>

                }
                else if (dataselectsearchinfo.bs.selecttype == "7")
                {
                    <div id="searchinfo" name="searchinfo"></div>
                    <script>
                        //富文本编辑器
                        if (isview) {
                            tinymce.init({
                                selector: '#searchinfo',
                                language: 'zh_CN',
                                contextmenu: false,
                                plugins: 'print preview searchreplace autolink directionality visualchars fullscreen image link media template code table charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists wordcount imagetools textpattern paste emoticons bdmap indent2em autoresize',
                                toolbar: 'code forecolor backcolor bold italic underline strikethrough | alignleft aligncenter alignright indent2em lineheight | \
                                                                                            bullist numlist | blockquote subscript superscript removeformat | \
                                                                                            table emoticons charmap hr  insertdatetime | fullscreen ',
                                menubar: false,
                                fontsize_formats: '12px 14px 16px 18px 24px 36px 48px 56px 72px',
                                autosave_ask_before_unload: false,
                                toolbar_drawer: false,
                                readonly: 1,
                            });
                            $('#searchinfo').html(theEntity.searchinfo);
                            mcelist.push('searchinfo');
                        }
                        else {
                            tinymce.init({
                                selector: '#searchinfo',
                                language: 'zh_CN',
                                contextmenu: false,
                                plugins: 'print preview searchreplace autolink directionality visualchars fullscreen image link media template code table charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists wordcount imagetools textpattern paste emoticons bdmap indent2em autoresize',
                                toolbar: 'code forecolor backcolor bold italic underline strikethrough | alignleft aligncenter alignright indent2em lineheight | \
                                                                                            bullist numlist | blockquote subscript superscript removeformat | \
                                                                                            table emoticons charmap hr  insertdatetime | fullscreen ',
                                menubar: false,
                                fontsize_formats: '12px 14px 16px 18px 24px 36px 48px 56px 72px',
                                autosave_ask_before_unload: false,
                                toolbar_drawer: false,

                            });
                            $('#searchinfo').html(theEntity.searchinfo);
                            mcelist.push('searchinfo');
                        }
                    </script>

                }
            }
            else
            {
                <input id="searchinfo" name="searchinfo" maxlength="2000" value="@obj.searchinfo" type="text" class="form-control column" required>}}
</div>
</div>
<div class="form-group form-group-sm">
    <label class="col-sm-2 control-label">@TranslateService.GetTranslate("", "Base_SysManage_base_searchplan_url", "页面")</label>
    <div class="col-sm-5">
        @{
            base_selectresource_data dataselecturl = dataHelper.GetDataUrlAll("Base_SysManage", "base_searchplan", "url");
            if (!dataselecturl.sr.IsNullOrEmpty() && !dataselecturl.sr.Id.IsNullOrEmpty())
            {
                if (dataselecturl.bs.selecttype == "1")
                {
                    <select id="url" name="url" value="@obj.url" class="form-control column selectpicker" data-live-search="true" required>
                        @foreach (DataRow rows in dataselecturl.data.Rows)
                        {
                            if (("," + @obj.url + ",").Contains("," + rows[0].ToString() + ","))
                            {
                                <option value="@rows[0]" selected>@rows[1]</option>
                            }
                            else
                            {
                                <option value="@rows[0]">@rows[1]</option>
                            }
                        }
                    </select>

                }
                else if (dataselecturl.bs.selecttype == "3")
                {
                    <select id="url" name="url" value="@obj.url" class="form-control column selectpicker" data-live-search="true" multiple required>
                        @foreach (DataRow rows in dataselecturl.data.Rows)
                        {
                            if (("," + @obj.url + ",").Contains("," + rows[0].ToString() + ","))
                            {
                                <option value="@rows[0]" selected>@rows[1]</option>
                            }
                            else
                            {
                                <option value="@rows[0]">@rows[1]</option>
                            }
                        }
                    </select>
                }
                else if (dataselecturl.bs.selecttype == "2")
                {
                    List<string> strs = new List<string>();
                    var urlval = "";
                    @foreach (DataRow rows in dataselecturl.data.Rows)
                    {
                        if (("," + @obj.url + ",").Contains("," + rows[0].ToString() + ","))
                        {
                            strs.Add(rows[1].ToString());
                            urlval = string.Join(",", strs);
                        }
                    }
                    string typename = @dataselecturl.sr.tablename.Split('.')[@dataselecturl.sr.tablename.Split('.').Length - 1];
                    string areaname = @dataselecturl.sr.tablename.Split('.')[@dataselecturl.sr.tablename.Split('.').Length - 3];
                    <input readonly='readonly' id='url__Name' name='url__Name' value='@urlval' onclick='openFormSelect("/@areaname/@typename","@dataselecturl.sr.filedcode,@dataselecturl.sr.filedvalue",this); ' type='text' class='form-control column' required readonly='readonly'>
                    <input readonly='readonly' id='url' name='url' value='@obj.url' type='text' style='display:none' class='form-control column' required readonly='readonly'>
                }
                else if (dataselecturl.bs.selecttype == "4")
                {
                    <div id='url__Img' style='width:100%; height:200px; overflow: auto'></div>
                    <input id='url__Name' name='url__Name' value='@obj.url' type='text' style='display:none' class='form-control column' required readonly='readonly' />
                    <input id='url' name='url' value='@obj.url' type='text' style='display:none' class='form-control column' required readonly='readonly' />
                    @Html.Raw("<script>\n");
                    @Html.Raw("$(function(){\n");
                    @Html.Raw("$('#url__Img').html5Uploader({\n");
                    @Html.Raw("asyncUpload: true,\n");
                    @Html.Raw("uploadUrl: '/Base_SysManage/Common/UploadFile',\n");
                    @Html.Raw("uploadLimit: 0,  //上传数量限制，0为不限\n");
                    @Html.Raw("sizeLimit: 5,    //大小限制，M\n");
                    @Html.Raw("type: 'file' //file即可上传文件也可上传图片\n");
                    @Html.Raw("});\n");
                    @Html.Raw("$('#url__Name').trigger('propertychange');});\n");
                    @Html.Raw("$('#url__Name').on(' input propertychange',function(){\n");
                    @Html.Raw("var urls = $(this).val().split(',');\n");
                    @Html.Raw("var ids = $('#url').val().split(',');\n");
                    @Html.Raw("$.each(urls, function(index, url){\n");
                    @Html.Raw("if(url!='')\n");
                    @Html.Raw("$('#url__Img').html5Uploader('insertItemNew',{src:url,id:ids[index]});\n");
                    @Html.Raw("});\n");
                    @Html.Raw("});\n");
                    @Html.Raw("</script>\n");
                }
                else if (dataselecturl.bs.selecttype == "6")
                {
                    <input id='url' name='url' value='@obj.url' type='text' style='display:none' class='form-control column' readonly='readonly' />
                    <select id='url__Name' class='form-control column' data-live-search='true'>
                        @foreach (DataRow rows in dataselecturl.data.Rows)
                        {
                            if ((',' + @obj.url + ',').Contains(',' + rows[0].ToString() + ','))
                            {
                                <option value='@rows[0]' selected>@rows[1]</option>
                            }
                            else
                            {
                                <option value='@rows[0]'>@rows[1]</option>
                            }
                        }
                    </select>
                    <script>
                        //初始化控件
                        $('#url__Name').on('select.editable-select', function (e, li) {
                            // do something...
                            $('#url').val(li.attr('value'));
                        }).editableSelect();
                        $('#url__Name').keyup(function () {
                            $('#url').val($('#url__Name').val());
                        });
                    </script>

                }
                else if (dataselecturl.bs.selecttype == "7")
                {
                    <div id="url" name="url"></div>
                    <script>
                        //富文本编辑器
                        if (isview) {
                            tinymce.init({
                                selector: '#url',
                                language: 'zh_CN',
                                contextmenu: false,
                                plugins: 'print preview searchreplace autolink directionality visualchars fullscreen image link media template code table charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists wordcount imagetools textpattern paste emoticons bdmap indent2em autoresize',
                                toolbar: 'code forecolor backcolor bold italic underline strikethrough | alignleft aligncenter alignright indent2em lineheight | \
                                                                                            bullist numlist | blockquote subscript superscript removeformat | \
                                                                                            table emoticons charmap hr  insertdatetime | fullscreen ',
                                menubar: false,
                                fontsize_formats: '12px 14px 16px 18px 24px 36px 48px 56px 72px',
                                autosave_ask_before_unload: false,
                                toolbar_drawer: false,
                                readonly: 1,
                            });
                            $('#url').html(theEntity.url);
                            mcelist.push('url');
                        }
                        else {
                            tinymce.init({
                                selector: '#url',
                                language: 'zh_CN',
                                contextmenu: false,
                                plugins: 'print preview searchreplace autolink directionality visualchars fullscreen image link media template code table charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists wordcount imagetools textpattern paste emoticons bdmap indent2em autoresize',
                                toolbar: 'code forecolor backcolor bold italic underline strikethrough | alignleft aligncenter alignright indent2em lineheight | \
                                                                                            bullist numlist | blockquote subscript superscript removeformat | \
                                                                                            table emoticons charmap hr  insertdatetime | fullscreen ',
                                menubar: false,
                                fontsize_formats: '12px 14px 16px 18px 24px 36px 48px 56px 72px',
                                autosave_ask_before_unload: false,
                                toolbar_drawer: false,

                            });
                            $('#url').html(theEntity.url);
                            mcelist.push('url');
                        }
                    </script>

                }
            }
            else
            {
                <input id="url" name="url" maxlength="200" value="@obj.url" type="text" class="form-control column" required>}}
</div>
</div>
<div class="form-group form-group-sm">
    <label class="col-sm-2 control-label">@TranslateService.GetTranslate("", "Base_SysManage_base_searchplan_Remark", "描述")</label>
    <div class="col-sm-5">
        @{
            base_selectresource_data dataselectRemark = dataHelper.GetDataUrlAll("Base_SysManage", "base_searchplan", "Remark");
            if (!dataselectRemark.sr.IsNullOrEmpty() && !dataselectRemark.sr.Id.IsNullOrEmpty())
            {
                if (dataselectRemark.bs.selecttype == "1")
                {
                    <select id="Remark" name="Remark" value="@obj.Remark" class="form-control column selectpicker" data-live-search="true">
                        @foreach (DataRow rows in dataselectRemark.data.Rows)
                        {
                            if (("," + @obj.Remark + ",").Contains("," + rows[0].ToString() + ","))
                            {
                                <option value="@rows[0]" selected>@rows[1]</option>
                            }
                            else
                            {
                                <option value="@rows[0]">@rows[1]</option>
                            }
                        }
                    </select>

                }
                else if (dataselectRemark.bs.selecttype == "3")
                {
                    <select id="Remark" name="Remark" value="@obj.Remark" class="form-control column selectpicker" data-live-search="true" multiple>
                        @foreach (DataRow rows in dataselectRemark.data.Rows)
                        {
                            if (("," + @obj.Remark + ",").Contains("," + rows[0].ToString() + ","))
                            {
                                <option value="@rows[0]" selected>@rows[1]</option>
                            }
                            else
                            {
                                <option value="@rows[0]">@rows[1]</option>
                            }
                        }
                    </select>
                }
                else if (dataselectRemark.bs.selecttype == "2")
                {
                    List<string> strs = new List<string>();
                    var Remarkval = "";
                    @foreach (DataRow rows in dataselectRemark.data.Rows)
                    {
                        if (("," + @obj.Remark + ",").Contains("," + rows[0].ToString() + ","))
                        {
                            strs.Add(rows[1].ToString());
                            Remarkval = string.Join(",", strs);
                        }
                    }
                    string typename = @dataselectRemark.sr.tablename.Split('.')[@dataselectRemark.sr.tablename.Split('.').Length - 1];
                    string areaname = @dataselectRemark.sr.tablename.Split('.')[@dataselectRemark.sr.tablename.Split('.').Length - 3];
                    <input readonly='readonly' id='Remark__Name' name='Remark__Name' value='@Remarkval' onclick='openFormSelect("/@areaname/@typename","@dataselectRemark.sr.filedcode,@dataselectRemark.sr.filedvalue",this); ' type='text' class='form-control column' readonly='readonly'>
                    <input readonly='readonly' id='Remark' name='Remark' value='@obj.Remark' type='text' style='display:none' class='form-control column' readonly='readonly'>
                }
                else if (dataselectRemark.bs.selecttype == "4")
                {
                    <div id='Remark__Img' style='width:100%; height:200px; overflow: auto'></div>
                    <input id='Remark__Name' name='Remark__Name' value='@obj.Remark' type='text' style='display:none' class='form-control column' readonly='readonly' />
                    <input id='Remark' name='Remark' value='@obj.Remark' type='text' style='display:none' class='form-control column' readonly='readonly' />
                    @Html.Raw("<script>\n");
                    @Html.Raw("$(function(){\n");
                    @Html.Raw("$('#Remark__Img').html5Uploader({\n");
                    @Html.Raw("asyncUpload: true,\n");
                    @Html.Raw("uploadUrl: '/Base_SysManage/Common/UploadFile',\n");
                    @Html.Raw("uploadLimit: 0,  //上传数量限制，0为不限\n");
                    @Html.Raw("sizeLimit: 5,    //大小限制，M\n");
                    @Html.Raw("type: 'file' //file即可上传文件也可上传图片\n");
                    @Html.Raw("});\n");
                    @Html.Raw("$('#Remark__Name').trigger('propertychange');});\n");
                    @Html.Raw("$('#Remark__Name').on(' input propertychange',function(){\n");
                    @Html.Raw("var urls = $(this).val().split(',');\n");
                    @Html.Raw("var ids = $('#Remark').val().split(',');\n");
                    @Html.Raw("$.each(urls, function(index, url){\n");
                    @Html.Raw("if(url!='')\n");
                    @Html.Raw("$('#Remark__Img').html5Uploader('insertItemNew',{src:url,id:ids[index]});\n");
                    @Html.Raw("});\n");
                    @Html.Raw("});\n");
                    @Html.Raw("</script>\n");
                }
                else if (dataselectRemark.bs.selecttype == "6")
                {
                    <input id='Remark' name='Remark' value='@obj.Remark' type='text' style='display:none' class='form-control column' readonly='readonly' />
                    <select id='Remark__Name' class='form-control column' data-live-search='true'>
                        @foreach (DataRow rows in dataselectRemark.data.Rows)
                        {
                            if ((',' + @obj.Remark + ',').Contains(',' + rows[0].ToString() + ','))
                            {
                                <option value='@rows[0]' selected>@rows[1]</option>
                            }
                            else
                            {
                                <option value='@rows[0]'>@rows[1]</option>
                            }
                        }
                    </select>
                    <script>
                        //初始化控件
                        $('#Remark__Name').on('select.editable-select', function (e, li) {
                            // do something...
                            $('#Remark').val(li.attr('value'));
                        }).editableSelect();
                        $('#Remark__Name').keyup(function () {
                            $('#Remark').val($('#Remark__Name').val());
                        });
                    </script>

                }
                else if (dataselectRemark.bs.selecttype == "7")
                {
                    <div id="Remark" name="Remark"></div>
                    <script>
                        //富文本编辑器
                        if (isview) {
                            tinymce.init({
                                selector: '#Remark',
                                language: 'zh_CN',
                                contextmenu: false,
                                plugins: 'print preview searchreplace autolink directionality visualchars fullscreen image link media template code table charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists wordcount imagetools textpattern paste emoticons bdmap indent2em autoresize',
                                toolbar: 'code forecolor backcolor bold italic underline strikethrough | alignleft aligncenter alignright indent2em lineheight | \
                                                                                            bullist numlist | blockquote subscript superscript removeformat | \
                                                                                            table emoticons charmap hr  insertdatetime | fullscreen ',
                                menubar: false,
                                fontsize_formats: '12px 14px 16px 18px 24px 36px 48px 56px 72px',
                                autosave_ask_before_unload: false,
                                toolbar_drawer: false,
                                readonly: 1,
                            });
                            $('#Remark').html(theEntity.Remark);
                            mcelist.push('Remark');
                        }
                        else {
                            tinymce.init({
                                selector: '#Remark',
                                language: 'zh_CN',
                                contextmenu: false,
                                plugins: 'print preview searchreplace autolink directionality visualchars fullscreen image link media template code table charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists wordcount imagetools textpattern paste emoticons bdmap indent2em autoresize',
                                toolbar: 'code forecolor backcolor bold italic underline strikethrough | alignleft aligncenter alignright indent2em lineheight | \
                                                                                            bullist numlist | blockquote subscript superscript removeformat | \
                                                                                            table emoticons charmap hr  insertdatetime | fullscreen ',
                                menubar: false,
                                fontsize_formats: '12px 14px 16px 18px 24px 36px 48px 56px 72px',
                                autosave_ask_before_unload: false,
                                toolbar_drawer: false,

                            });
                            $('#Remark').html(theEntity.Remark);
                            mcelist.push('Remark');
                        }
                    </script>

                }
            }
            else
            {
                <input id="Remark" name="Remark" maxlength="200" value="@obj.Remark" type="text" class="form-control column">}}
</div>
</div>
<div class="form-group form-group-sm">
    <label class="col-sm-2 control-label">@TranslateService.GetTranslate("", "Base_SysManage_base_searchplan_isdefault", "是否设置为默认")</label>
    <div class="col-sm-5">
        @{
            base_selectresource_data dataselectisdefault = dataHelper.GetDataUrlAll("Base_SysManage", "base_searchplan", "isdefault");
            if (!dataselectisdefault.sr.IsNullOrEmpty() && !dataselectisdefault.sr.Id.IsNullOrEmpty())
            {
                if (dataselectisdefault.bs.selecttype == "1")
                {
                    <select id="isdefault" name="isdefault" value="@obj.isdefault" class="form-control column selectpicker" data-live-search="true">
                        @foreach (DataRow rows in dataselectisdefault.data.Rows)
                        {
                            if (("," + @obj.isdefault + ",").Contains("," + rows[0].ToString() + ","))
                            {
                                <option value="@rows[0]" selected>@rows[1]</option>
                            }
                            else
                            {
                                <option value="@rows[0]">@rows[1]</option>
                            }
                        }
                    </select>

                }
                else if (dataselectisdefault.bs.selecttype == "3")
                {
                    <select id="isdefault" name="isdefault" value="@obj.isdefault" class="form-control column selectpicker" data-live-search="true" multiple>
                        @foreach (DataRow rows in dataselectisdefault.data.Rows)
                        {
                            if (("," + @obj.isdefault + ",").Contains("," + rows[0].ToString() + ","))
                            {
                                <option value="@rows[0]" selected>@rows[1]</option>
                            }
                            else
                            {
                                <option value="@rows[0]">@rows[1]</option>
                            }
                        }
                    </select>
                }
                else if (dataselectisdefault.bs.selecttype == "2")
                {
                    List<string> strs = new List<string>();
                    var isdefaultval = "";
                    @foreach (DataRow rows in dataselectisdefault.data.Rows)
                    {
                        if (("," + @obj.isdefault + ",").Contains("," + rows[0].ToString() + ","))
                        {
                            strs.Add(rows[1].ToString());
                            isdefaultval = string.Join(",", strs);
                        }
                    }
                    string typename = @dataselectisdefault.sr.tablename.Split('.')[@dataselectisdefault.sr.tablename.Split('.').Length - 1];
                    string areaname = @dataselectisdefault.sr.tablename.Split('.')[@dataselectisdefault.sr.tablename.Split('.').Length - 3];
                    <input readonly='readonly' id='isdefault__Name' name='isdefault__Name' value='@isdefaultval' onclick='openFormSelect("/@areaname/@typename","@dataselectisdefault.sr.filedcode,@dataselectisdefault.sr.filedvalue",this); ' type='text' class='form-control column' readonly='readonly'>
                    <input readonly='readonly' id='isdefault' name='isdefault' value='@obj.isdefault' type='text' style='display:none' class='form-control column' readonly='readonly'>
                }
                else if (dataselectisdefault.bs.selecttype == "4")
                {
                    <div id='isdefault__Img' style='width:100%; height:200px; overflow: auto'></div>
                    <input id='isdefault__Name' name='isdefault__Name' value='@obj.isdefault' type='text' style='display:none' class='form-control column' readonly='readonly' />
                    <input id='isdefault' name='isdefault' value='@obj.isdefault' type='text' style='display:none' class='form-control column' readonly='readonly' />
                    @Html.Raw("<script>\n");
                    @Html.Raw("$(function(){\n");
                    @Html.Raw("$('#isdefault__Img').html5Uploader({\n");
                    @Html.Raw("asyncUpload: true,\n");
                    @Html.Raw("uploadUrl: '/Base_SysManage/Common/UploadFile',\n");
                    @Html.Raw("uploadLimit: 0,  //上传数量限制，0为不限\n");
                    @Html.Raw("sizeLimit: 5,    //大小限制，M\n");
                    @Html.Raw("type: 'file' //file即可上传文件也可上传图片\n");
                    @Html.Raw("});\n");
                    @Html.Raw("$('#isdefault__Name').trigger('propertychange');});\n");
                    @Html.Raw("$('#isdefault__Name').on(' input propertychange',function(){\n");
                    @Html.Raw("var urls = $(this).val().split(',');\n");
                    @Html.Raw("var ids = $('#isdefault').val().split(',');\n");
                    @Html.Raw("$.each(urls, function(index, url){\n");
                    @Html.Raw("if(url!='')\n");
                    @Html.Raw("$('#isdefault__Img').html5Uploader('insertItemNew',{src:url,id:ids[index]});\n");
                    @Html.Raw("});\n");
                    @Html.Raw("});\n");
                    @Html.Raw("</script>\n");
                }
                else if (dataselectisdefault.bs.selecttype == "6")
                {
                    <input id='isdefault' name='isdefault' value='@obj.isdefault' type='text' style='display:none' class='form-control column' readonly='readonly' />
                    <select id='isdefault__Name' class='form-control column' data-live-search='true'>
                        @foreach (DataRow rows in dataselectisdefault.data.Rows)
                        {
                            if ((',' + @obj.isdefault + ',').Contains(',' + rows[0].ToString() + ','))
                            {
                                <option value='@rows[0]' selected>@rows[1]</option>
                            }
                            else
                            {
                                <option value='@rows[0]'>@rows[1]</option>
                            }
                        }
                    </select>
                    <script>
                        //初始化控件
                        $('#isdefault__Name').on('select.editable-select', function (e, li) {
                            // do something...
                            $('#isdefault').val(li.attr('value'));
                        }).editableSelect();
                        $('#isdefault__Name').keyup(function () {
                            $('#isdefault').val($('#isdefault__Name').val());
                        });
                    </script>

                }
                else if (dataselectisdefault.bs.selecttype == "7")
                {
                    <div id="isdefault" name="isdefault"></div>
                    <script>
                        //富文本编辑器
                        if (isview) {
                            tinymce.init({
                                selector: '#isdefault',
                                language: 'zh_CN',
                                contextmenu: false,
                                plugins: 'print preview searchreplace autolink directionality visualchars fullscreen image link media template code table charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists wordcount imagetools textpattern paste emoticons bdmap indent2em autoresize',
                                toolbar: 'code forecolor backcolor bold italic underline strikethrough | alignleft aligncenter alignright indent2em lineheight | \
                                                                                            bullist numlist | blockquote subscript superscript removeformat | \
                                                                                            table emoticons charmap hr  insertdatetime | fullscreen ',
                                menubar: false,
                                fontsize_formats: '12px 14px 16px 18px 24px 36px 48px 56px 72px',
                                autosave_ask_before_unload: false,
                                toolbar_drawer: false,
                                readonly: 1,
                            });
                            $('#isdefault').html(theEntity.isdefault);
                            mcelist.push('isdefault');
                        }
                        else {
                            tinymce.init({
                                selector: '#isdefault',
                                language: 'zh_CN',
                                contextmenu: false,
                                plugins: 'print preview searchreplace autolink directionality visualchars fullscreen image link media template code table charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists wordcount imagetools textpattern paste emoticons bdmap indent2em autoresize',
                                toolbar: 'code forecolor backcolor bold italic underline strikethrough | alignleft aligncenter alignright indent2em lineheight | \
                                                                                            bullist numlist | blockquote subscript superscript removeformat | \
                                                                                            table emoticons charmap hr  insertdatetime | fullscreen ',
                                menubar: false,
                                fontsize_formats: '12px 14px 16px 18px 24px 36px 48px 56px 72px',
                                autosave_ask_before_unload: false,
                                toolbar_drawer: false,

                            });
                            $('#isdefault').html(theEntity.isdefault);
                            mcelist.push('isdefault');
                        }
                    </script>

                }
            }
            else
            {
                <input id="isdefault" name="isdefault" maxlength="10" value="@obj.isdefault" type="text" class="form-control column">}}
</div>
</div>
@{
    List<base_extendedfield> exs = dataHelper.GetExFileds("Base_SysManage", "base_searchplan");
    foreach (var ex in exs)
    {

        Type type = ExFielddHelper.GetFieldType(ex.filedtype);
        if (ex.exfiled.Equals("StatusFlag", StringComparison.OrdinalIgnoreCase)
               || ex.exfiled.Equals("CreateDate", StringComparison.OrdinalIgnoreCase)
               || ex.exfiled.Equals("CreateOperator", StringComparison.OrdinalIgnoreCase)
               || ex.exfiled.Equals("ApproveDate", StringComparison.OrdinalIgnoreCase)
               || ex.exfiled.Equals("ApproveOperator", StringComparison.OrdinalIgnoreCase)
               || ex.exfiled.Equals("PostDate", StringComparison.OrdinalIgnoreCase)
               || ex.exfiled.Equals("PostOperator", StringComparison.OrdinalIgnoreCase)
               || ex.exfiled.Equals("ModifyDate", StringComparison.OrdinalIgnoreCase)
               || ex.exfiled.Equals("IsDelete", StringComparison.OrdinalIgnoreCase)
               || ex.exfiled.Equals("ModifyOperator", StringComparison.OrdinalIgnoreCase))
            return;
        //Form页面中的Html
        string newFormRow = $@"";
        string minview = "text";
        string format = "yyyy-MM-dd HH:mm:ss";
        string formatpicker = "yyyy-mm-dd hh:ii:ss";
        string required = "";
        string hidden = "";
        //if (ex.IsAllowNull == "1")
        //{
        //    required = "";
        //}

        //if (ex.IsFieldShow == "1")
        //{
        //    hidden = "";
        //}
        if (ex.filedtype.Equals("date", StringComparison.OrdinalIgnoreCase))
        {
            minview = "text";
            format = "yyyy-MM-dd";
            formatpicker = "yyyy-mm-dd";
        }
        if (type == typeof(DateTime))
        {
            <div class="form-group form-group-sm" @hidden>
                <label class="col-sm-4 control-label">@ex.filedname</label>
                <div class="col-sm-8">
                    <input id="@ex.exfiled" name="@ex.exfiled" data-date-format="@format" maxlength="@ex." value="@obj.{@ex.exfiled}.ToString('@format')" type="@minview" class="form-control column Wdate" @required>
                    <div class="help-block with-errors"></div>
                </div>
            </div>
        }
        else if (type == typeof(DateTime?))
        {
            <div class="form-group form-group-sm" @hidden>
                <label class="col-sm-4 control-label">@ex.filedname</label>
                <div class="col-sm-8">
                    <input id="@ex.exfiled" name="@ex.exfiled" data-date-format="{format}" maxlength="100" value="@obj.{@ex.exfiled}.ToString('@format')" type="@minview" class="form-control column Wdate" @required>
                    <div class="help-block with-errors"></div>
                </div>
            </div>
        }
        else if (type == typeof(string) || type == typeof(String))
        {
            <div class='form-group form-group-sm'>
                <label class='col-sm-2 control-label'>@TranslateService.GetTranslate("", $@"Base_SysManage_base_searchplan_{ex.exfiled}", $@"{ex.filedname}")</label>
                <div class='col-sm-5'>
                    @{base_selectresource_data dataselect = dataHelper.GetDataUrlAll("Base_SysManage", "base_searchplan", $@"{ex.exfiled}");
                        if (!dataselect.sr.IsNullOrEmpty() && !dataselect.sr.Id.IsNullOrEmpty())
                        {
                            if (dataselect.bs.selecttype == "1")
                            {
                                <select id='@ex.exfiled' name='@ex.exfiled' value='@obj[ex.exfiled]' class='form-control column selectpicker' data-live-search='true'>
                                    @foreach (DataRow rows in dataselect.data.Rows)
                                    {
                                        if ((',' + obj[ex.exfiled]?.ToString() + ',').Contains(',' + rows[0].ToString() + ','))
                                        {
                                            <option value='@rows[0]' selected>@rows[1]</option>
                                        }
                                        else
                                        {
                                            <option value='@rows[0]'>@rows[1]</option>
                                        }
                                    }
                                </select>

                            }
                            else if (dataselect.bs.selecttype == "3")
                            {
                                <select id='@ex.exfiled' name='@ex.exfiled' value='@obj[ex.exfiled]?.ToString()' class='form-control column selectpicker' data-live-search='true' multiple>
                                    @foreach (DataRow rows in dataselect.data.Rows)
                                    {
                                        if ((',' + @obj[ex.exfiled]?.ToString() + ',').Contains(',' + rows[0].ToString() + ','))
                                        {
                                            <option value='@rows[0]' selected>@rows[1]</option>
                                        }
                                        else
                                        {
                                            <option value='@rows[0]'>@rows[1]</option>
                                        }
                                    }
                                </select>
                            }
                            else if (dataselect.bs.selecttype == "2")
                            {
                                List<string> strs = new List<string>();
                                var Remarkval = "";
                                @foreach (DataRow rows in dataselect.data.Rows)
                                {
                                    if ((',' + @obj[ex.exfiled]?.ToString() + ',').Contains(',' + rows[0].ToString() + ','))
                                    {
                                        strs.Add(rows[1].ToString());
                                        Remarkval = string.Join(",", strs);
                                    }
                                }
                                string typename = dataselect.sr.tablename.Split('.')[dataselect.sr.tablename.Split('.').Length - 1];
                                string areaname = dataselect.sr.tablename.Split('.')[dataselect.sr.tablename.Split('.').Length - 3];
                                <input readonly='readonly' id='@ex.exfiled.ToString()__Name' name='@ex.exfiled.ToString()__Name' value='@Remarkval' onclick='openFormSelect(' /@areaname/@typename','@dataselect.sr.filedcode,@dataselect.sr.filedvalue',this); ' type='text' class='form-control column' readonly='readonly'>
                                <input readonly='readonly' id='@ex.exfiled' name='{@ex.exfiled}' value='@obj[ex.exfiled]?.ToString()' type='text' style='display:none' class='form-control column' readonly='readonly'>
                            }
                            else if (dataselect.bs.selecttype == "4")
                            {
                                <div id='@ex.exfiled.ToString()__Img' style='width:100%; height:200px; overflow: auto'></div>
                                <input id='@ex.exfiled.ToString()__Name' name='@ex.exfiled.ToString()__Name' value='@obj[ex.exfiled]?.ToString()' type='text' style='display:none' class='form-control column' readonly='readonly' />
                                <input id='@ex.exfiled' name='@ex.exfiled' value='@obj[ex.exfiled]?.ToString()' type='text' style='display:none' class='form-control column' readonly='readonly' />
                                @Html.Raw("                                <script>\n");
                                                     @Html.Raw("$(function(){\n");
                                                     @Html.Raw("$('#"+@ex.exfiled+"__Img').html5Uploader({\n");
                                                     @Html.Raw("asyncUpload: true,\n");
                                                     @Html.Raw("uploadUrl: '/Base_SysManage/Common/UploadFile',\n");
                                                     @Html.Raw("uploadLimit: 0,  //上传数量限制，0为不限\n");
                                                     @Html.Raw("sizeLimit: 50,    //大小限制，M\n");
                                                     @Html.Raw("type: 'file' //file即可上传文件也可上传图片\n");
                                                     @Html.Raw("});\n");
                                                     @Html.Raw("$('#"+@ex.exfiled+"__Name').trigger('propertychange');});\n");
                                                     @Html.Raw("$('#"+@ex.exfiled+"__Name').on(' input propertychange',function(){\n");
                                                     @Html.Raw("var urls = $(this).val().split(',');\n");
                                                     @Html.Raw("var ids = $('#"+@ex.exfiled+"').val().split(',');\n");
                                                     @Html.Raw("$.each(urls, function(index, url){\n");
                                                     @Html.Raw("if(url!='')\n");
                                                     @Html.Raw("$('#"+@ex.exfiled+"__Img').html5Uploader('insertItemNew',{src:url,id:ids[index]});\n");
                                                     @Html.Raw("});\n");
                                                     @Html.Raw("});\n");
                                                     @Html.Raw("</script>\n");
                            }
                            else if (dataselect.bs.selecttype == "6")
                            {
                                <input id='@ex.exfiled' name='@ex.exfiled' value='@obj.GetPropertyValue(ex.exfiled)?.ToString()' type='text' style='display:none' class='form-control column' readonly='readonly' @required />
                                <select id='@ex.exfiled.ToString()__Name' class='form-control column' data-live-search='true'>
                                    @foreach (DataRow rows in dataselect.data.Rows)
                                    {
                                        if ((',' + obj.GetPropertyValue(ex.exfiled)?.ToString() + ',').Contains(',' + rows[0].ToString() + ','))
                                        {
                                            <option value='@rows[0]' selected>@rows[1]</option>
                                        }
                                        else
                                        {
                                            <option value='@rows[0]'>@rows[1]</option>
                                        }
                                    }
                                </select>
                                <script>
                                                         //初始化控件
                                                        $('#@ex.exfiled.ToString()__Name').on('select.editable-select', function (e,li) {
                                                            // do something...
                                                            $('#@ex.exfiled.ToString()').val(li.attr('value'));
                                                            }).editableSelect();
                                                        $('#@ex.exfiled.ToString()__Name').keyup(function(){
                                                               $('#@ex.exfiled.ToString()').val($('#@ex.exfiled.ToString()__Name').val());
                                                        });
                                </script>

                            }
                            else if (dataselect.bs.selecttype == "7")
                            {
                                <div id="@ex.exfiled" name="@ex.exfiled"></div>
                                <script>
                                                          //富文本编辑器
                                                            if (isview) {
                                                                tinymce.init({
                                                                    selector: '#@ex.exfiled',
                                                                    language: 'zh_CN',
                                                                    contextmenu: false,
                                                                    plugins: 'print preview searchreplace autolink directionality visualchars fullscreen image link media template code table charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists wordcount imagetools textpattern paste emoticons bdmap indent2em autoresize',
                                                                    toolbar: 'code forecolor backcolor bold italic underline strikethrough | alignleft aligncenter alignright indent2em lineheight | \
                                                                        bullist numlist | blockquote subscript superscript removeformat | \
                                                                        table emoticons charmap hr  insertdatetime | fullscreen ',
                                                                    menubar: false,
                                                                    fontsize_formats: '12px 14px 16px 18px 24px 36px 48px 56px 72px',
                                                                    autosave_ask_before_unload: false,
                                                                    toolbar_drawer: false,
                                                                    readonly: 1,
                                                                });
                                                               $('#@ex.exfiled').html(theEntity.@ex.exfiled);
                                                                mcelist.push('@ex.exfiled');
                                                            }
                                                            else {
                                                                tinymce.init({
                                                                    selector: '#@ex.exfiled',
                                                                    language: 'zh_CN',
                                                                    contextmenu: false,
                                                                    plugins: 'print preview searchreplace autolink directionality visualchars fullscreen image link media template code table charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists wordcount imagetools textpattern paste emoticons bdmap indent2em autoresize',
                                                                    toolbar: 'code forecolor backcolor bold italic underline strikethrough | alignleft aligncenter alignright indent2em lineheight | \
                                                                        bullist numlist | blockquote subscript superscript removeformat | \
                                                                        table emoticons charmap hr  insertdatetime | fullscreen ',
                                                                    menubar: false,
                                                                    fontsize_formats: '12px 14px 16px 18px 24px 36px 48px 56px 72px',
                                                                    autosave_ask_before_unload: false,
                                                                    toolbar_drawer: false,

                                                                });
                                                                $('#@ex.exfiled').html(theEntity.@ex.exfiled);
                                                                 mcelist.push('@ex.exfiled');
                                                         }
                                </script>

                            }
                        }
                        else
                        {
                            <input id='@ex.exfiled' name='@ex.exfiled' maxlength='100' value='@obj[ex.exfiled]?.ToString()' type='text' class='form-control column'>
                        }
                    }
                </div>
            </div>
        }
        else if (type == typeof(int) || type == typeof(Int32))
        {
            <div class="form-group form-group-sm" @hidden>
                <label class="col-sm-4 control-label">@TranslateService.GetTranslate("", $@"Base_SysManage_base_searchplan_{ex.exfiled}", $@"{ex.filedname}")</label>
                <div class="col-sm-8">
                    <input id="@ex.exfiled" name="@ex.exfiled" maxlength="{aField.ColumnLength}" placeholder="0" value="@obj.@ex.exfiled" type="number" class="form-control column" @required>
                    <div class="help-block with-errors"></div>
                </div>
            </div>
        }
        else if (type == typeof(Decimal) || type == typeof(decimal))
        {
            <div class="form-group form-group-sm" @hidden>
                <label class="col-sm-4 control-label">@TranslateService.GetTranslate("", $@"Base_SysManage_base_searchplan_{ex.exfiled}", $@"{ex.filedname}")</label>
                <div class="col-sm-8">
                    <input id="@ex.exfiled" name="@ex.exfiled" maxlength="{aField.ColumnLength}" placeholder="0" value="@obj.@ex.exfiled" type="number" step="0.000001" class="form-control column" @required>
                    <div class="help-block with-errors"></div>
                </div>
            </div>
        }
        else
        {
            <div class="form-group form-group-sm" @hidden>
                <label class="col-sm-4 control-label">@TranslateService.GetTranslate("", $@"Base_SysManage_base_searchplan_{ex.exfiled}", $@"{ex.filedname}")</label>
                <div class="col-sm-8">
                    <input id="@ex.exfiled" name="@ex.exfiled" maxlength="{ex.ColumnLength}" value="@obj.@ex.exfiled" type="text" class="form-control column" @required>
                    <div class="help-block with-errors"></div>
                </div>
            </div>
        }
    }
}
<!-- tab标签 -->
<ul id='myTab' class='nav nav-tabs'>
</ul>
<div id='myTabContent' class='tab-content'>

</div>
<div class="form-group">
    <button id="submit" type="submit" class="hidden">@TranslateService.GetTranslate("", "System_Submit", "提交")</button>
</div>
</form>
</div>
<script class='col-sm-5'>
                @{
                    List<base_linkage> links = dataHelper.GetLinks("Base_SysManage", "base_searchplan");
                    foreach(var link in links)
                    {
                            @Html.Raw($@"
                            $('#{link.tablefiled}').change(function () {{
                                var values = $('#form').getValues();

                                $.extend(theEntity, values);
                                var dataValue = {{}};
                                for (var item in theEntity) {{
                                    if (theEntity[item] != null)
                                        theEntity[item] = theEntity[item].toString();
                                }}
                                dataValue['theData'] = theEntity;
                                dataValue['areaName'] = 'Base_SysManage';
                                dataValue['entityName'] = 'base_searchplan';
                                dataValue['FiledName'] = '{link.tablefiled}';
                                dataValue['ValueName'] = '{link.linkfiled}';

                                $.postJSON('/Base_SysManage/base_searchplan/GetLinkData', dataValue, function (resJson) {{
                                    if (resJson.Success) {{
                                        if ($('#{link.linkfiled}').prop('nodeName') == 'SELECT') {{
                                            var filedvalue=$('#{link.linkfiled}').val();
                                            $('#{link.linkfiled}').empty();
                                            for (var i=0;i<resJson.Data.data.length;i++) {{
                                                var item=resJson.Data.data[i];
                                                var opt = new Option(item[resJson.Data.sr.filedvalue+'C'],item[resJson.Data.sr.filedcode])
                                                $('#{link.linkfiled}').append(opt);
                                            }}
                                            if(filedvalue!='')
                                            $('#{link.linkfiled}').selectpicker('val',filedvalue)
                                            $('#{link.linkfiled}').selectpicker('refresh');
                                            if(((resJson.Data.data.length==1&&resJson.Data.bs.selecttype!='1')||(resJson.Data.bs.selecttype=='1'&&resJson.Data.data.length==2))){{
                                                    $('#{link.linkfiled}').selectpicker('val',resJson.Data.data[resJson.Data.data.length-1][resJson.Data.sr.filedcode]);
                                            }}
                                            $('#{link.linkfiled}').selectpicker('refresh');
                                        }} else {{
                                            if (resJson.Data.data.length > 0){{
                                                if(((resJson.Data.data.length==1&&resJson.Data.bs.selecttype!='1')||(resJson.Data.bs.selecttype=='1'&&resJson.Data.data.length==2))){{
                                                    $('#{link.linkfiled}').val(resJson.Data.data[resJson.Data.data.length-1][resJson.Data.sr.filedcode]);
                                                }}
                                            }}
                                        }}
                                    }}
                                    else {{
                                        dialogError(resJson.Msg);
                                    }}
                                }});
                            }});
                            ");
                    }
                }
</script>
<script>

    $(function () {
        initEvent();
        if(isview)
        {
            $(".column").attr("disabled",true);
        }
    });

    //事件绑定
    function initEvent() {
        //表单校验
        $('#form').validator().on('submit', function (e) {
            //校验成功
            if (!e.isDefaultPrevented()) {
                e.preventDefault();

                var values = $('#form').getValues();

                $.extend(theEntity, values);
                loading();
                var dataValue = {};
                for (var item in theEntity){
                    if(theEntity[item]!=null)
                    theEntity[item] = theEntity[item].toString();
                }
                for (var mce in mcelist){
                   theEntity[mcelist[mce]] = tinymce.get(mcelist[mce]).getContent();
                }
                dataValue['theData'] = theEntity;

                $.postJSONByJson('/Base_SysManage/base_searchplan/MainSaveData', dataValue, function (resJson) {
                    loading(false);

                    if (resJson.Success) {
                        parent.$('#dataTable').bootstrapTable('refresh');
                        parent.dialogSuccess();

                        dialogClose();
                    }
                    else {
                        dialogError(resJson.Msg);
                    }
                });
            }
        })
    }

    //提交表单
    function submitForm() {
        $('#submit').trigger('click');
    }
    //清除表单数据
    function clearForm() {

    }
     $(function () {
        $('#WorkerContractImg').html5Uploader({
            //imgs: theEntity[aImgId],
            asyncUpload: true,
            uploadUrl: '/Base_SysManage/Common/UploadFile',
            uploadLimit: 0,  //上传数量限制，0为不限
            sizeLimit: 5,    //大小限制，M
            type:'file' //file即可上传文件也可上传图片
        });
    });


    //手写文字识别
    function OCRForm() {
        //获取上传后的url
        var url = $('#WorkerContractImg').html5Uploader('getUploadFiles');
        //console.log(url);
        // 返回 web 主机的域名，如：http://127.0.0.1:8080/testdemo/test.html?id=1&name=test
        var href = window.location.href;
        // 返回当前页面的路径和文件名，如：/testdemo/test.html
        var pathname = window.location.pathname;
        pathname = href.replace(pathname, "");
        // 获取参数，如：?id=1&name=test
        var search = window.location.search;
        pathname = pathname.replace(search, "") + " / ";


        url = (String(url)).replace(pathname, "");
            url = url.replace(/\//g, "\\");


            loading();
        $.postJSON('/Visit/visit_type_authorize/OCRData', { FileName: (url) }, function (resJson) {
                //loading(false);
                if (resJson.Success) {
                   $table.bootstrapTable('refresh');
                    dialogSuccess('表单识别成功!');
                }
                else {
                    dialogError(resJson.Msg);
                }
            });
    }
    //语音识别输入
    function speech() {
    alert('功能完善中');
    }

    function openFormSelect(modelurl,returnkey,obj) {
        dialogOpen({
            id: 'form1',
            title: '@TranslateService.GetTranslate("","System_Select","选择")',
            btn: ['@TranslateService.GetTranslate("","System_Confirm","确定")', '@TranslateService.GetTranslate("","System_Cancel","取消")'],
            height: '80%',
            url: modelurl + '/GetIndex?returnkey=' + returnkey,
            yes: function(window, index) {
                 $(obj).val(window.chekcName);
                 $(obj).next().val(window.chekcCode).trigger("propertychange");
                 dialogClose("form1");
            }
        });
    }
</script>
